package com.yygo.service.impl;

import com.yygo.dao.CountyDao;
import com.yygo.model.County;
import com.yygo.service.CountyManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by tiansha on 2015/6/24.
 */
@Service("countyManager")
public class CountyManagerImpl extends GenericManagerImpl<County, Long> implements CountyManager {

    private CountyDao countyDao;

    @Autowired
    public CountyManagerImpl(CountyDao countyDao) {
        super(countyDao);
        this.countyDao = countyDao;
    }

    @Override
    public County getCountyIdByName(String cityName, String countyName) {
       return countyDao.findIdByName(countyName, cityName);
    }
}
